

#ifndef __SYS_CONFIG_H__
#define __SYS_CONFIG_H__

#include <stdint.h>

typedef struct _sysconfig {
    uint32_t crc32[2];
    uint8_t enc_key[16];
    struct {
        uint32_t len;
        uint8_t version[4];
        char date[16];
        char time[16];
    } firm_info;
    struct {
        char serial_no[16];
        uint32_t id;
    } board_info;
    uint8_t key_enable;
} syscfg_t;

int save_syscfg(const syscfg_t *cfg);
int load_syscfg(syscfg_t* cfg);
const syscfg_t *get_syscfg(void);

#endif /* __SYS_CONFIG_H__ */
